package com.nineclock.sign.controller;


import com.nineclock.sign.dto.SignAllUserDTO;
import com.nineclock.sign.service.SignService;
import com.nineclock.common.entity.Result;
import com.nineclock.sign.SignControllerApi;
import com.nineclock.sign.dto.SignDTO;
import com.nineclock.sign.dto.SignInfoDTO;
import com.nineclock.sign.pojo.SignInfo;
import com.nineclock.sign.service.SignlzzService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
public class SignController implements SignControllerApi {
    @Autowired
    private SignService signService;
    @GetMapping("/pagingSignCurrentUserByMonth")
          public Result queryPageCurrentUserByMonth( String dateStr){
            List<SignDTO> signDTOS=signService.queryPageCurrentUserByMonth(dateStr);
            return Result.success(signDTOS);

         }
    @Autowired
    SignlzzService signlzzService;
    @Override
    @GetMapping("/listSignAllUser")
    public Result<List<SignAllUserDTO>> listSignAllUser(String dateStr) {
        List<SignAllUserDTO>data=signlzzService.listSignAllUser(dateStr);

        return Result.success(data);
    }
}
